]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspaceAnimation: Make WorkspaceGroup public
authorSergio Costas <raster@rastersoft.com>
Sat, 18 Dec 2021 23:05:21 +0000 (00:05 +0100)
committerMarge Bot <marge-bot@gnome.org>
Wed, 22 Dec 2021 18:27:07 +0000 (18:27 +0000)
The WorkspaceGroup class in defined as CONST, which means that,
strictly speaking, is inaccessible from outside the file
workspaceAnimation.js. But Desktop Icons NG needs access to it.

Although the current Javascript engine "tolerates" this access,
a warning message is shown in the log advertising that it's
incorrect, and that although it is still allowed, the code
should be fixed.

This patch changes the definition from CONST to VAR to allow
accessing it from extensions.

jk

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2068>

js/ui/workspaceAnimation.js

index d240fe1562e887681403b310a96c2dea1149704a..f61afe323b152d70837976b04419dedf3a20a8a6 100644 (file)
@@ -1,5 +1,5 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
-/* exported WorkspaceAnimationController */
+/* exported WorkspaceAnimationController, WorkspaceGroup */
 
 const { Clutter, GObject, Meta, Shell, St } = imports.gi;
 
@@ -11,7 +11,7 @@ const SwipeTracker = imports.ui.swipeTracker;
 const WINDOW_ANIMATION_TIME = 250;
 const WORKSPACE_SPACING = 100;
 
-const WorkspaceGroup = GObject.registerClass(
+var WorkspaceGroup = GObject.registerClass(
 class WorkspaceGroup extends Clutter.Actor {
     _init(workspace, monitor, movingWindow) {
         super._init();